% plot_rivers.m  3/26/2014  Parker MacCready
%
% This plots the file "rivers.nc" along with 
% climatological values.

clear; addpath('../../../alpha'); Ldir = Lstart;

%%

% could automate to read the last good entry in RIVER_LOG.csv and
% then plot that file

indir = [Ldir.out, Ldir.gtag, '/'];
fdate = 'f2014.03.27';
fn = [indir, fdate, '/rivers.nc'];

tsec = nc_varget(fn,'river_time');
% river_time is time in seconds since 1/1/1970)

td00 = datenum(1970,1,1);
td = td00 + tsec/86400;
q = nc_varget(fn,'river_transport');
q = abs(q);
id = nc_varget(fn,'river');

%% plotting

Z_fig(16)
plot(td,q)
datetick